<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
<div class="login-container">
    <div class="login-box">
        <h2>登录</h2>
        <form action="login" method="post" class="login-form">
            <div class="input-group">
                <label for="username">账号</label>
                <input type="text" id="username" name="username" placeholder="请输入您的账号" required>
            </div>
            <div class="input-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" placeholder="请输入您的密码" required>
            </div>
            <button type="submit" class="login-button">登录</button>
        </form>
        <div class="options">
            <p>没有账号？<a href="register.jsp">注册</a></p>
            <div id="message">
                <jsp:useBean id="loginBean"  scope="request" class="com.example.bean.LoginBean"></jsp:useBean>
                <%
                    if (loginBean != null && loginBean.getMessage() != null && !loginBean.getMessage().isEmpty()) {%>
                <p><%= loginBean.getMessage() %></p>
                <%
                    }%>
            </div>
        </div>
    </div>
</div>
</body>
</html>